<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="org.apache.commons.dbutils.handlers.ScalarHandler"%>
<%@page import="org.apache.commons.dbutils.QueryRunner"%>
<%@page import="cn.cjyll.C3P0DataSoure.JDBCUtilsC3P0"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<%
//获取数据库中用户列表数量
     QueryRunner qr = new QueryRunner(JDBCUtilsC3P0.getDataSoure());
     String sql = "select count(*) from tuser";
	 Object o = qr.query(sql,new ScalarHandler<Object>());
	 request.setAttribute("rs", o);                //  总注册人数
	 
	 // 正常账号数量
	 String status1 = "select count(*) from tuser where status = '开通'";
	 Object o1 = qr.query(status1,new ScalarHandler<Object>());
	 request.setAttribute("status1", o1);
	
	//  禁用账号数量
	 String status2 = "select count(*) from tuser where status = '禁用'";
	 Object o2 = qr.query(status2,new ScalarHandler<Object>());
	 request.setAttribute("status2", o2);
	
	//商品数量
	 String status3 = "select count(*) from shop";
     Object o3 = qr.query(status3,new ScalarHandler<Object>());
     request.setAttribute("shop", o3);
     session.setAttribute("shop", o3);
		 
 %>


<div class="page-container">
    <div class="sidebar-menu">

        <div class="sidebar-menu-inner">
            
            <header class="logo-env">

                <!-- logo -->
                <div class="logo">
                    <a href="index.html">
                       <h2 style="color:white;">流控管理系统</h2>
                    </a>
                </div>

                <!-- logo collapse icon -->
                <div class="sidebar-collapse">
                    <a href="#" class="sidebar-collapse-icon">
                        <i class="entypo-menu"></i>
                    </a>
                </div>

                                
             
                <div class="sidebar-mobile-menu visible-xs">
                    <a href="#" class="with-animation">
                        <i class="entypo-menu"></i>
                    </a>
                </div>

            </header>
            
                                    
            <ul id="main-menu" class="main-menu">
                      <li>
                    <a href="${pageContext.request.contextPath }/management/admin/index.jsp">
                        <i class="entypo-gauge"></i>
                        <span class="title">平台首页</span>
                    </a>
                </li>
                <li>
                    <a href="#">
                        <i class="entypo-monitor"></i>
                        <span class="title">服务管理</span>
                    </a>
                    <ul>
                        <li>
                            <a href="${pageContext.request.contextPath }/management/admin/fwqInfo.jsp">
                                <span class="title">服务器信息</span>
                            </a>
                     

                        </li>

                    </ul>
                </li>

                <li>
                    <a href="#">
                        <i class="entypo-newspaper"></i>
                        <span class="title">账号管理</span>
                    </a>
                        <ul>
                            <li>
                                <a href="${pageContext.request.contextPath }/management/admin/preAddZh.jsp">
                                    <span class="title">批量添加账号</span>
                                </a>
                            </li>
                            <li>
                                <a href="${pageContext.request.contextPath }/management/admin/addzh.jsp">
                                    <span class="title">添加账号</span>
                                </a>
                            </li>
                            <li>
                                <a href="${pageContext.request.contextPath }/zhListServlet">
                                    <span class="title">账号列表</span>
                                    <span class="label label-success pull-right">${requestScope.rs }</span>
                                </a>
                            </li>
                        </ul>
                    </li>
                    <li>
                        <a href="#">
                            <i class="entypo-box"></i>
                            <span class="title">商品管理</span>
                        </a>
                        <ul>
                            <li>
                                <a href="${pageContext.request.contextPath }/management/admin/addshop.jsp">
                                    <span class="title">添加商品</span>
                                    
                                </a>
                            </li>
                            <li>
                                <a href="${pageContext.request.contextPath }/shopListServlet">
                                    <span class="title">商品列表</span>
                                </a>
                            </li>
                      <li>
                                <a href="${pageContext.request.contextPath }/DdServlet">
                                    <span class="title">订单管理</span>
                                    <span class="badge badge-info badge-roundless">New</span>
                                </a>
                            </li>
                      
                        </ul>
                    </li>
                <li>
            
                <li>
                    <a href="#">
                        <i class="entypo-window"></i>
                        <span class="title">官网管理</span>
                    </a>
                        <ul>
                            <li>
                                <a href="${pageContext.request.contextPath }/management/admin/gg.jsp">
                                    <span class="title">发布公告</span>
                                </a>
                            </li>
                            <li>
                                <a>
                                    <span class="title"><s>大图设置</s>&nbsp;&nbsp;开发中</span>
                                </a>
                            </li>
                            <li>
                                <a href="#">
                                    <span class="title"><s>支付宝设置</s>&nbsp;&nbsp;开发中</span>
                                </a>
                            </li>
                        </ul>
                    </li>
                <li>
                    <a href="#">
                        <i class="entypo-bag"></i>
                        <span class="title">云端管理</span>
                        <span class="badge badge-info badge-roundless">New</span>
                    </a>
                        <ul>
                                   </li>
                            <li>
                                <a>
                                    <span class="title"><s>云端后台登录</s>&nbsp;&nbsp;开发中</span>
                                </a>
                            </li>
                            <li>
                                <a>
                                    <span class="title"><s>云端公告管理</s>&nbsp;&nbsp;开发中</span>
                                </a>
                            </li>
                        </ul>
                    </li>
                <li>
                    <a href="#">
                        <i class="entypo-flow-tree"></i>
                        <span class="title">平台日志</span>
                    </a>
                        <ul>
                            <li>
                                <a href="${pageContext.request.contextPath }/deleteLog" onclick="javascript:alert('清空日志成功！')">
                                    <span class="title">清空日志</span>
                                </a>
                            </li>
                            <li>
                                <a>
                                    <span class="title"><s>在线用户</s>&nbsp;&nbsp;开发中</span>
                                </a>
                            </li>
                            <li>
                                <a>
                                    <span class="title"><s>实时监控日志</s>&nbsp;&nbsp;开发中</span>
                                </a>
                            </li>
                        </ul>
                    </li>
                    </ul>
                </li>
            </ul>
            
        </div>

    </div>
        <div class="main-content">
                
        <div class="row">
        
            <!-- Profile Info and Notifications -->
            <div class="col-md-6 col-sm-8 clearfix">
        
                <ul class="user-info pull-left pull-none-xsm">
        
                    <!-- Profile Info -->
                    <li class="profile-info dropdown"><!-- add class "pull-right" if you want to place this from right -->
        
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <img src="${pageContext.request.contextPath }/management/assets/images/thumb-1@2x.png" alt="我的头像" class="img-circle" width="44" />
                            欢迎您，超级管理员：${sessionScope.username }
                        </a>
        

                    </li>
        
                </ul>
                
                <ul class="user-info pull-left pull-right-xs pull-none-xsm">
        
                   
                    <li class="notifications dropdown">
        
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
                            <i class="entypo-attention"></i>
                            <span class="badge badge-info"></span>
                        </a>

                    </li>
        
                  
                    <li class="notifications dropdown">
        
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
                            <i class="entypo-mail"></i>
                            <span class="badge badge-secondary"></span>
                        </a>
        

                    </li>
        
    
                    <li class="notifications dropdown">
        
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
                            <i class="entypo-list"></i>
                            <span class="badge badge-warning"></span>
                        </a>
        

        
                    </li>
        

        
            </div>
        

            <div class="col-md-6 col-sm-4 clearfix hidden-xs">
        
                <ul class="list-inline links-list pull-right">
        

        
                    
                    <li>
                        
                            <i class="entypo-chat"></i>
                  <a href="${pageContext.request.contextPath }/management/admin/msg.jsp">修改密码</a>
        
                            <span class="badge badge-success chat-notifications-badge is-hidden">0</span>
                        
                    </li>
        
                    <li class="sep"></li>
        
                    <li>
                        <a href="${pageContext.request.contextPath }/AdminRemoveSession">
                            退出登录 <i class="entypo-logout right"></i>
                        </a>
                    </li>
                </ul>
        
            </div>
        
        </div>
      
        <hr />
